Array is not passed on to next() method while making iterator in JavaScript

visit shbcf.ru